﻿using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net.Mime;

namespace pandx.Mulan.Helpers
{
    public class ImageFormatHelper
    {
        public static ImageFormat GetRawImageFormat(byte[] bytes)
        {
            using (var memoryStream = new MemoryStream(bytes))
            {
                var image = Image.FromStream(memoryStream);
                return image.RawFormat;
            }
        }
    }
}
